package itbour.onetouchshow.bean;

import java.util.List;

/**
 * Created by Yang on 2017/12/4.
 */

public class VideoPreviewBean {


    /**
     * watermarkPay : 0
     * bgInfo : {"list":[{"thumb":"http://itbour-generate.oss-cn-hangzhou.aliyuncs.com/image/U2/2017/12/02/120752071_IZ3XSiOziYdlbBNMlHTn/0.jpg","id":20059,"name":"视频背景测试专用01","useCount":0,"h":1280,"w":720,"opType":1},{"thumb":"http://itbour-generate.oss-cn-hangzhou.aliyuncs.com/image/U2/2017/12/02/120907644_Eqqb4rvsKN1XWp2NzKXl/0.jpg","id":20060,"name":"视频背景测试专用01","useCount":0,"h":1280,"w":720,"opType":1},{"thumb":"http://itbour-generate.oss-cn-hangzhou.aliyuncs.com/image/U2/2017/12/02/123859317_j5UsMr825p2HsA3ajF80/0.jpg","id":20065,"name":"视频背景测试","useCount":0,"h":1280,"w":720,"opType":1}],"column":3,"currentBg":{"docNm":"我的作品","videoFrame":{"an":0,"y":437.5,"x":0,"ct":2,"h":1280,"w":720},"image":{"h":1280,"thumbs":["http://itbour-generate.oss-cn-hangzhou.aliyuncs.com/image/U299188/2017/12/04/201553729_KMumW66F2MJYaUsndIHe/0.jpg"],"w":720}}}
     * id : 398
     * video : {"videoUrl":"http://itbour-generate.itbour.com/video/U299188/2017/12/04/201551430_EVDrYoknHvNLkpn9nXSH/0.mp4","videoSize":103926,"duration":3.32,"h":1080,"thumbs":["http://itbour-generate.itbour.com/video/U299188/2017/12/04/201551430_EVDrYoknHvNLkpn9nXSH/thumb.jpg"],"w":1920}
     * watermarkFee : 1000
     * watermark : 1
     * opType : 2
     * docNm  作品名称
     */

    private int watermarkPay;
    private BgInfoBean bgInfo;
    private int id;
    private VideoBean video;
    private int watermarkFee;
    private int watermark;  //0表示已经去水印了  1表示有水印
    private int opType;
    private int showFormFb;  //0不现实
    private int formState;   //0未开启
    private String docNm;

    private ProductState mState = null;

    public ProductState getProductState() {
        if (watermark == 0) {
            return ProductState.STATE_NO_WATERMARK;
        } else if (watermark == 1) {
            return ProductState.STATE_HAS_WATERMARK;
        } else {
            return ProductState.STATE_HAS_WATERMARK;
        }
    }

    public String getDocNm() {
        return docNm;
    }

    public void setDocNm(String docNm) {
        this.docNm = docNm;
    }

    public int getShowFormFb() {
        return showFormFb;
    }

    public void setShowFormFb(int showFormFb) {
        this.showFormFb = showFormFb;
    }

    public int getFormState() {
        return formState;
    }

    public void setFormState(int formState) {
        this.formState = formState;
    }

    public int getWatermarkPay() {
        return watermarkPay;
    }

    public void setWatermarkPay(int watermarkPay) {
        this.watermarkPay = watermarkPay;
    }

    public BgInfoBean getBgInfo() {
        return bgInfo;
    }

    public void setBgInfo(BgInfoBean bgInfo) {
        this.bgInfo = bgInfo;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public VideoBean getVideo() {
        return video;
    }

    public void setVideo(VideoBean video) {
        this.video = video;
    }

    public int getWatermarkFee() {
        return watermarkFee;
    }

    public void setWatermarkFee(int watermarkFee) {
        this.watermarkFee = watermarkFee;
    }

    public int getWatermark() {
        return watermark;
    }

    public void setWatermark(int watermark) {
        this.watermark = watermark;
    }

    public int getOpType() {
        return opType;
    }

    public void setOpType(int opType) {
        this.opType = opType;
    }

    public enum ProductState {
        STATE_NO_WATERMARK, STATE_HAS_WATERMARK
    }

    public static class BgInfoBean {
        /**
         * list : [{"thumb":"http://itbour-generate.oss-cn-hangzhou.aliyuncs.com/image/U2/2017/12/02/120752071_IZ3XSiOziYdlbBNMlHTn/0.jpg","id":20059,"name":"视频背景测试专用01","useCount":0,"h":1280,"w":720,"opType":1},{"thumb":"http://itbour-generate.oss-cn-hangzhou.aliyuncs.com/image/U2/2017/12/02/120907644_Eqqb4rvsKN1XWp2NzKXl/0.jpg","id":20060,"name":"视频背景测试专用01","useCount":0,"h":1280,"w":720,"opType":1},{"thumb":"http://itbour-generate.oss-cn-hangzhou.aliyuncs.com/image/U2/2017/12/02/123859317_j5UsMr825p2HsA3ajF80/0.jpg","id":20065,"name":"视频背景测试","useCount":0,"h":1280,"w":720,"opType":1}]
         * column : 3
         * currentBg : {"docNm":"我的作品","videoFrame":{"an":0,"y":437.5,"x":0,"ct":2,"h":1280,"w":720},"image":{"h":1280,"thumbs":["http://itbour-generate.oss-cn-hangzhou.aliyuncs.com/image/U299188/2017/12/04/201553729_KMumW66F2MJYaUsndIHe/0.jpg"],"w":720}}
         */

        private int column;
        private CurrentBgBean currentBg;
        private List<ListBean> list;


        public int getColumn() {
            return column;
        }

        public void setColumn(int column) {
            this.column = column;
        }

        public CurrentBgBean getCurrentBg() {
            return currentBg;
        }

        public void setCurrentBg(CurrentBgBean currentBg) {
            this.currentBg = currentBg;
        }

        public List<ListBean> getList() {
            return list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }

        public static class CurrentBgBean {
            /**
             * docNm : 我的作品
             * videoFrame : {"an":0,"y":437.5,"x":0,"ct":2,"h":1280,"w":720}
             * image : {"h":1280,"thumbs":["http://itbour-generate.oss-cn-hangzhou.aliyuncs.com/image/U299188/2017/12/04/201553729_KMumW66F2MJYaUsndIHe/0.jpg"],"w":720}
             */

            private String docNm;
            private VideoFrameBean videoFrame;
            private ImageBean image;

            public String getDocNm() {
                return docNm;
            }

            public void setDocNm(String docNm) {
                this.docNm = docNm;
            }

            public VideoFrameBean getVideoFrame() {
                return videoFrame;
            }

            public void setVideoFrame(VideoFrameBean videoFrame) {
                this.videoFrame = videoFrame;
            }

            public ImageBean getImage() {
                return image;
            }

            public void setImage(ImageBean image) {
                this.image = image;
            }

            public static class VideoFrameBean {
                /**
                 * an : 0
                 * y : 437.5
                 * x : 0
                 * ct : 2
                 * h : 1280
                 * w : 720
                 */

                private double an;
                private double y;
                private double x;
                private double ct;
                private double h;
                private double w;

                public double getAn() {
                    return an;
                }

                public void setAn(double an) {
                    this.an = an;
                }

                public double getY() {
                    return y;
                }

                public void setY(double y) {
                    this.y = y;
                }

                public double getX() {
                    return x;
                }

                public void setX(double x) {
                    this.x = x;
                }

                public double getCt() {
                    return ct;
                }

                public void setCt(double ct) {
                    this.ct = ct;
                }

                public double getH() {
                    return h;
                }

                public void setH(double h) {
                    this.h = h;
                }

                public double getW() {
                    return w;
                }

                public void setW(double w) {
                    this.w = w;
                }
            }

            public static class ImageBean {
                /**
                 * h : 1280
                 * thumbs : ["http://itbour-generate.oss-cn-hangzhou.aliyuncs.com/image/U299188/2017/12/04/201553729_KMumW66F2MJYaUsndIHe/0.jpg"]
                 * w : 720
                 */

                private double h;
                private double w;
                private List<String> thumbs;

                public double getH() {
                    return h;
                }

                public void setH(double h) {
                    this.h = h;
                }

                public double getW() {
                    return w;
                }

                public void setW(double w) {
                    this.w = w;
                }

                public List<String> getThumbs() {
                    return thumbs;
                }

                public void setThumbs(List<String> thumbs) {
                    this.thumbs = thumbs;
                }
            }
        }

        public static class ListBean {
            /**
             * thumb : http://itbour-generate.oss-cn-hangzhou.aliyuncs.com/image/U2/2017/12/02/120752071_IZ3XSiOziYdlbBNMlHTn/0.jpg
             * id : 20059
             * name : 视频背景测试专用01
             * useCount : 0
             * h : 1280
             * w : 720
             * opType : 1
             */

            private String thumb;
            private int id;
            private String name;
            private int useCount;
            private int h;
            private int w;
            private int opType;

            public String getThumb() {
                return thumb;
            }

            public void setThumb(String thumb) {
                this.thumb = thumb;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public int getUseCount() {
                return useCount;
            }

            public void setUseCount(int useCount) {
                this.useCount = useCount;
            }

            public int getH() {
                return h;
            }

            public void setH(int h) {
                this.h = h;
            }

            public int getW() {
                return w;
            }

            public void setW(int w) {
                this.w = w;
            }

            public int getOpType() {
                return opType;
            }

            public void setOpType(int opType) {
                this.opType = opType;
            }
        }
    }

}
